package com.wbp.cms.qatest.dao;

import java.util.Date;

import javax.annotation.Resource;

import org.junit.Test;

import com.wbp.cms.client.project.domain.ProjectDO;
import com.wbp.cms.core.project.dao.ContractDAO;
import com.wbp.cms.core.project.dao.ProjectDAO;
import com.wbp.cms.core.project.dao.ProjectProfitDAO;
import com.wbp.cms.core.project.dao.ProjectWorkOrderDAO;
import com.wbp.cms.qatest.BaseTest;


/**
 * @Description: 
 * @Department:
 * @author andy.lhc
 * @date 2016年3月12日 上午12:06:08 
 */
public class ProjectDAOTest extends BaseTest {

  @Resource
  private ProjectDAO  projectDAO ;
  
  @Resource
  private ProjectProfitDAO  projectProfitDAO ;
  
  @Resource
  private ContractDAO  contractDAO ;
  
  @Resource
  private ProjectWorkOrderDAO  projectWorkOrderDAO ;
  
  
  @Test
  public void test_insert01(){
   
    ProjectDO  projectDO = new ProjectDO();
    projectDO.setProjectName("tes-0001");
    projectDO.setProductId(1L);
    projectDO.setCustomerId(3L);
    projectDO.setCustomerName("lihc");
    projectDO.setUserId(5L);
    projectDO.setUserName("yu");
    projectDO.setPreAmount(100.00d);
    projectDO.setReserveType(1);
    projectDO.setPaymoneyDate(new Date().toString());
    projectDO.setStatus(1);
    projectDO.setMobileNumber("133444433");
    projectDO.setIdCard("345333333344");
    
    Long  projectId =  this.projectDAO.insert(projectDO) ;
    
    if(projectId !=null && projectId > 0){
        // 增加Contract 
      
        // 增加projectProfit 
      
        // 增加  projectWorkOrder 
      
      
    }
    
    
  }
  
  
}
